package com.hong.spring.aop.service.impl;

import com.hong.spring.aop.common.DataResponse;
import com.hong.spring.aop.service.OrderService;
import org.springframework.stereotype.Service;

/**
 * @Auther: csh
 * @Date: 2020/7/14 17:01
 * @Description:订单实现
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Override
    public DataResponse<Boolean> pay(String orderId,int payMoney) {
        if(payMoney==0||payMoney<=0){
            throw  new IllegalArgumentException("支付失败，金额有误！");
        }
        System.out.println("支付订单号："+orderId+"支付金额："+payMoney);
        return DataResponse.BuildSuccessResponse();
    }
}
